///aktazo_main.cpp
///main c++ file for aktazo project

#include <iostream>
#include <sstream>
///sstream is for the help and about messages

#include "aktazo.h"

int main(int argc, char *argv[])
{
	std::cout<<"Az Aktazo udvozli Ont."<<std::endl;
	///to see that program is started

	std::ostringstream help_message;
	std::ostringstream about_message;

	help_message<<"SUGO"<<std::endl<<
		"[[Ez itt a sugo szovege lesz]]"<<std::endl;

	about_message<<"NEVJEGY"<<std::endl<<
		"   Aktazo alkalmazas"<<std::endl<<
		"   Beadando az IP-08abtSZT targybol."<<std::endl<<
		"   Iratok (szamlak, hatarozatok stb.) iktatasara szolgalo alkalmazas."<<std::endl<<
		"Verzio: "<<std::endl<<
		"   (pre-prototype)"<<std::endl<<
		"   build: "<<__DATE__<<", "<<__TIME__<<std::endl<<
		"Program futtatasa:"<<std::endl<<
		"   aktazo"<<std::endl<<
		"Sugo:"<<std::endl<<
		"   aktazo help"<<std::endl<<
		"Nevjegy:"<<std::endl<<
		"   aktazo about us"<<std::endl<<
		"Licenc:"<<std::endl<<
		"   GNU GPL v2, http://www.gnu.org/licenses/old-licenses/gpl-2.0.html"<<std::endl<<
		"Honlap:"<<std::endl<<
		"   http://code.google.com/p/aktazo/"<<std::endl;

	if(1==argc)
	{
		///exactly zero program parameter means './aktazo'
		///running the main program
		try
		{
			Aktazo aktazo;
		}
		catch(...)
		{
			std::cerr<<"Kezeletlen kivetel tortent. Jobban sajnaljuk, mint gondolna. Vegtelenul. Es meg annal is jobban."<<std::endl;
		}
	}
	else if(2==argc)
	{
		///exactly one program parameter means './aktazo param1'
		///example: './aktazo help'
		std::cout<<help_message.str();
	}
	else
	{
		///at least two program parameter means './aktazo param1 param2 ...'
		///example: './aktazo about us'
		std::cout<<about_message.str();
		std::cout<<help_message.str();
	}

	std::cout<<"Az Aktazo most kilep."<<std::endl;
	///user can see that program is finished normally
	return(0);
}
